package com.wsm.springcloud_compose.compose_user_consumer_feign.controller;

import com.wsm.springcloud_compose.compose_user_bean.response.SysUsersResponse;
import com.wsm.springcloud_compose.compose_user_consumer_feign.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @name: UserController
 * @Author: wangshimin
 * @Date: 2019-09-01  17:31
 * @Description:
 */
@RestController
public class UserController {

    @Autowired
    private UserService userService;

    @RequestMapping(value = "/login", method = RequestMethod.GET)
    public SysUsersResponse login(@RequestParam String userName) {
        return userService.login(userName);
    }

    /*@RequestMapping(value = "/getRolesById", method = RequestMethod.GET)
    public List<SysRoles> getRolesById(long id) {
        return userService.getRolesById(id);
    }


    @RequestMapping(value = "/getPermissionsById", method = RequestMethod.GET)
    public List<SysPermissions> getPermissionsById(long id) {
        return userService.getPermissionsById(id);
    }
*/
}